home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-14 | 628 b | 36 lines | [TEXT/PJMM] |
- (* just a silly little programme to time the Fixed-point conversions *)
- Program TestFixedConversions;
- Uses
- Events, FixedPointConversions;
-
- Const
- kTestLoops = 10000;
-
- Var
- FixA: Fixed;
- RealA: Real;
- IntA: LongInt;
- StartTime, EndTime: Real;
- gLoop: LongInt;
-
- Begin
- {$IFC UNDEFINED THINK_Pascal}
- {$ELSEC}
- ShowText;
- {$ENDC}
-
- RealA := 3;
- IntA := -2;
-
- StartTime := TickCount;
- For gLoop := 1 To kTestLoops Do
- Begin
- FixA := ConvertRealToFixed(RealA);
- RealA := ConvertFixedToDouble(FixA);
- RealA := ConvertIntToDouble(IntA);
- End;
-
- EndTime := TickCount;
-
- Writeln('ElapseTime :', (EndTime - StartTime) / 60 : 1 : 4);
- End.